
package ch.hearc.coursJava.kitBase.junit;

import static org.junit.Assert.assertTrue;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

public class HelloJunitTest
	{

	/*------------------------------------------------------------------*\
	 |*							Constructeurs							*|
	 \*------------------------------------------------------------------*/

	@Before
	public void before()
		{
		// rien
		}

	@After
	public void after()
		{
		// rien
		}

	/*------------------------------------------------------------------*\
	 |*							Methodes Public							*|
	 \*-----------------------------------------------------------------*/

	@Test
	public void testAddition()
		{
		int a = 1;
		int b = 2;
		int resultatTheorique = 3;
		int resultat = MachineCalculer.addition(a, b);

		assertTrue(resultatTheorique == resultat);
		}

	@Test
	public void testAddition2()
		{
		int a = 3;
		int b = 7;
		int resultatTheorique = 10;
		int resultat = MachineCalculer.addition(a, b);

		assertTrue(resultatTheorique == resultat);
		}

	@Test
	public void testAdditionBoth()
		{
			//Test 1
			{
			int a = 1;
			int b = 2;
			int resultatTheorique = 3;
			int resultat = MachineCalculer.addition(a, b);

			assertTrue(resultatTheorique == resultat);
			}

			//Test 2
			{
			int a = 3;
			int b = 7;
			int resultatTheorique = 10;
			int resultat = MachineCalculer.addition(a, b);

			assertTrue(resultatTheorique == resultat);
			}
		}

	@Test
	public void testMultiplication()
		{
		int a = 3;
		int b = 7;
		int resultatTheorique = 21;
		int resultat = MachineCalculer.multiplier(a, b);

		assertTrue(resultatTheorique == resultat);
		}

	/*------------------------------------------------------------------*\
	|*							Methodes Private						*|
	\*------------------------------------------------------------------*/

	}
